package com.woniuxy;

import com.woniuxy.firstfactory.Person;
import com.woniuxy.fourthfactory.BeanFactory;

public class Main {
    public static void main(String[] args) {

        //同学们来实现：每次getBean拿到不同对象 新增一句话
        //在加一句话
        //合并提交 和之前一次提交合并在一起提交
        //现在我完成了整个业务的开发 可以合并之前的提交一起提交
        BeanFactory beanFactory = new BeanFactory();
        Person person = (Person) beanFactory.getBean("russia");
        person.eat();
        System.out.println(person);
        Person person1 = (Person) beanFactory.getBean("russia");
        person.eat();
        System.out.println(person1);
        Person person2 = (Person) beanFactory.getBean("russia");
        person.eat();
        System.out.println(person2);
    }
}
